﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cqrs.Common;

namespace Cqrs.CodeGeneration.CSharp
{
    public partial class DomainClass
    {
        private CSharpGenerator _generatorModel;
        private string _methodParameters = "";
        private string _eventParameters = "";
        private string _ctorParameters = "";
        private string _ctorEventParameters = "";
        public DomainClass(CSharpGenerator generatorModel)
        {
            _generatorModel = generatorModel;
        }

        public string CtorEventName
        {
            get
            {
                var eventName = _generatorModel.CommandEventGeneratorModels.Where(
                    p => p.CreatesInitialState).FirstOrDefault();

                return FormatUtils.RemoveNonAlphaChars(eventName == null ? "" : eventName.EventName);

            }
        }
    }
}
